﻿/*
 * Copyright (c) <2012> <guangboo49@gmail.com>
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this 
 * software and associated documentation files (the "Software"), to deal in the Software 
 * without restriction, including without limitation the rights to use, copy, modify, merge, 
 * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 
 * to whom the Software is furnished to do so, subject to the following conditions: 
 * The above copyright notice and this permission notice shall be included in all copies or 
 * substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 
 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

using System;

namespace Optparse {
    /// <summary>
    /// The interface of command-line options.
    /// </summary>
    public interface IArgOption {
        /// <summary>
        /// Get the full name of command, such as --filename, or --port
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Get the alias name of command, such as -f as --filename, -p as --port.
        /// </summary>
        string Alias { get; }

        /// <summary>
        /// Get the description of command which describe the option usage.
        /// </summary>
        string Description { get; }

        /// <summary>
        /// Get the help text.
        /// </summary>
        string HelpText { get; }

        /// <summary>
        /// Get the multple that indicate the command value support multiple values.
        /// </summary>
        //bool Multiple { get; }

        /// <summary>
        /// Get the value of command.
        /// </summary>
        object Value { get; }

        /// <summary>
        /// Get the values of command, available if multiple is true.
        /// </summary>
        //Array Values { get; }

        /// <summary>
        /// Get the type of command value.
        /// </summary>
        Type ValueType { get; }

        void Parse(string optValue);
    }

    public interface IArgOption<T> : IArgOption {
        new T Value { get; }
        //new T[] Values { get; }
        T Default { get; }
    }
}
